package com.showtao.front.dto.upstream;

import java.io.Serializable;

import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.NotEmpty;

@SuppressWarnings("serial")
public class MessageSavingDto implements Serializable {

	private Long id;
	@NotEmpty
	private String title;
	@NotEmpty
	private String content;
	@NotEmpty
	@Pattern(regexp="(^\\d{11}$)|(^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$)", 
	    message="联系方式格式不正确，必须为11位手机号码或邮箱.")
	private String contact;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

}
